﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Net.Http;

namespace FileUploadApp
{
    public class LoginUser
    {
        public static string InterfaceUrl { get; set; }

        public static string FilePath { get; set; }

        public static int CzId { get; set; }

        public static LastFile lastFile { get; set; } = new LastFile() { LastPicTime = DateTime.Parse("2024-01-01"), LastVideoTime = DateTime.Parse("2024-01-01"), LastRwjlTime = DateTime.Parse("2024-01-01") };

        public static IHttpClientFactory httpClientFactory { get; set; }

        public static void Regedit()
        {
            var servces = new ServiceCollection();
            servces.AddHttpClient();
            var provider = servces.BuildServiceProvider();
            httpClientFactory = provider.GetRequiredService<IHttpClientFactory>();
        }
    }
}
